<template>
	<view class="body"> 
		<image class="logo" src="../../../static/icons/leju-logo.png" mode=""></image>
		
		<view class="hao">
			<input type="text" value="dpq" placeholder="" />
		</view>
		
		
		<view class="pwd">
			<input type="password" value="123456"/>
		</view>
		
		<view class="login" @tap="login">
		 	登录
		</view>
		
		
		<view class="footer">
			<view class="p1">
				忘记密码
			</view>丨
			<view class="p1">
				注册
			</view>
		</view>
	</view>
</template>

<script>
	import {doLogin} from "../../../util/user/login.js"
	export default {
		data() {
			return {
				
			};
		},
		methods:{
		async login(){
				var res = await doLogin({
					username:"dpq",
					password:"123456"
				})
				console.log(res)
				
				uni.setStorageSync("code",res.data.code)
				uni.setStorageSync("data",res.data.data)
				if(res.data.code="S"){
					
					uni.switchTab({
						url:`../user`
					})
				}
				
			}
		},
		onLoad() {
			
				uni.setNavigationBarTitle({
					title: '登录',
				
				});
				uni.setNavigationBarColor({
				
					frontColor: '#ffffff',
					backgroundColor: ' #354E44',
					animation: {
						duration: 400,
						timingFunc: 'easeIn'
					}
				})
			
		}
	}
</script>

<style lang="scss" scoped>
	.body {
		background-color: #F1ECE7;
		width: 100%;
		height: 100vh;
		overflow: hidden;
	}
	
	.logo{
		width: 212rpx;
		height: 212rpx;
		margin-left: 270rpx;
		margin-top: 154rpx;
		border-radius: 50%;
	}
	
	.hao{
		width: 600rpx;
		height: 80rpx;
		border-radius:90rpx;
		// background-color: yellow;
		margin: 0 auto;
		margin-top: 100rpx;
		
		
		border: none;
		
		-webkit-box-shadow: 0 0 30px 0 rgba(43,86,112,.1);
		box-shadow: 0 0 30px 0 rgba(43,86,112,.1);
		
		
		 margin-bottom: 12px;
		display: flex;
		align-items: center;
		padding: 16rpx;
		input{
				display: block;
			    height: 100%;
				margin-left: 30rpx;
			    background: none;
			    color: inherit;
			    opacity: 1;
			    -webkit-text-fill-color: currentcolor;
			    font: inherit;
			    line-height: inherit;
			    letter-spacing: inherit;
			    text-align: inherit;
			    text-indent: inherit;
			    text-transform: inherit;
			    text-shadow: inherit;
		}
	}
	
	
	.pwd{
		width: 600rpx;
		height: 80rpx;
		border-radius:90rpx;
		// background-color: yellow;
		margin: 0 auto;
		margin-top: 12rpx;
		
		
		border: none;
		
		-webkit-box-shadow: 0 0 30px 0 rgba(43,86,112,.1);
		box-shadow: 0 0 30px 0 rgba(43,86,112,.1);
		
		
		 margin-bottom: 12px;
		display: flex;
		align-items: center;
		padding: 16rpx;
		input{
				display: block;
			    height: 100%;
				margin-left: 30rpx;
			    background: none;
			    color: inherit;
			    opacity: 1;
			    -webkit-text-fill-color: currentcolor;
			    font: inherit;
			    line-height: inherit;
			    letter-spacing: inherit;
			    text-align: inherit;
			    text-indent: inherit;
			    text-transform: inherit;
			    text-shadow: inherit;
		}
	}
	
	.login{
		width: 600rpx;
		height: 100rpx;
		border-radius:90rpx;
		background: #354E44;
		margin: 0 auto;
		margin-top: 100rpx;
		color: #FFFFFF;
		font-weight: bold;
		text-align: center;
		line-height: 100rpx;
	}
	.footer{
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 100rpx;
	}
</style>
